//
//  ProductViewController.h
//  AppMua5
//
//  Created by duong nguyen on 9/13/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ViewApi.h"
#import "MuaAPI.h"
#import "ProductObject.h"
#import "ASIHTTPRequest.h"
#import "DefinePath.h"
#import "ASIFormDataRequest.h"
#import "ShopMuaCell.h"
#import "CommonAPI.h"
#import "ProductDetailViewController.h"

@interface ProductViewController : UIViewController<UITableViewDataSource,UITableViewDelegate,ASIHTTPRequestDelegate,UIScrollViewDelegate>{
    // Views
    ViewApi *viewApi;
    UIView *headerBelow;
    UITableView *productTableView;
    
    // Request data
    MuaAPI *muaApi;
    ASIHTTPRequest *requestData;
    NSMutableArray *productList;
    UIActivityIndicatorView *indicatorView;
    UIBarButtonItem *rightButtonItem;
    
    // Dung de phan biet khi nao load by catgory khi nao load by shop
    Boolean isGetListProductByCategory;
    
    // Common Apis
    CommonAPI *commonApi;
}

@property (nonatomic,retain) MuaAPI *muaApi;
@property (nonatomic,retain) ViewApi *viewApi;
@property (nonatomic,retain) CommonAPI *commonApi;
@property (nonatomic,retain) ASIHTTPRequest *requestData;
@property (nonatomic,retain) UIView *headerBelow;
@property (nonatomic,retain) UITableView *productTableview;
@property (nonatomic,retain) NSMutableArray *productList;
@property (nonatomic,retain) UIActivityIndicatorView *indicatorView;
@property (nonatomic,retain) UIBarButtonItem *rightButtonItem;
@property (nonatomic) Boolean isGetListProductByCategory;

-(void) initProductView;
-(void) initIndicatorView;

// Request data.
-(void) getProductListByCategory:(NSInteger)categoryId;
-(void) getListProductByShop:(NSInteger)userId shopObject:(ShopObject *)shop;
@end
